package com.usian.feign;

import com.usian.model.article.pojos.ApArticle;
import com.usian.model.article.pojos.ApArticleConfig;
import com.usian.model.article.pojos.ApArticleContent;
import com.usian.model.article.pojos.ApAuthor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-article")
public interface ApArticleFeign {


    @PostMapping("/api/v1/article/save")
    public ApArticle saveApArticle(@RequestBody ApArticle article);

    @PostMapping("/api/v1/articleContent/save")
    public ApArticleContent saveApArticleContent(@RequestBody ApArticleContent articleContent);

    @PostMapping("/api/v1/articleConfig/save")
    public ApArticleConfig saveApArticleConfig(@RequestBody ApArticleConfig articleConfig);

    @GetMapping("/api/v1/author/findByName/{name}")
    public ApAuthor findByName(@PathVariable("name") String name);
}
